angular.module('myApp',[]).
factory('json',function () { //通过factory和service方法共享数据，依赖注入自动注入到service里面
    return {
        name : "李四"
    }
}).
controller('firstController',function ($scope,json) {
    $scope.Data = json;
    $scope.data = {name:'张三'};
}).
controller('secondController',function ($scope,json) {
    $scope.data = $scope.$$prevSibling.data;  //指针，通过作用域链的寻址和赋值来共享数据，兄弟作用域或者父亲作用域
    $scope.Data = json;
})
